package com.fenghen.system.service.impl;

import com.fenghen.common.core.text.Convert;
import com.fenghen.system.domain.ResourcePlanning;
import com.fenghen.system.mapper.ResourcePlanningMapper;
import com.fenghen.system.service.IResourcePlanningService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 资源规划管理Service业务层处理
 * 
 * @author fenghen
 * @date 2024-11-03
 */
@Service
public class ResourcePlanningServiceImpl implements IResourcePlanningService 
{
    @Autowired
    private ResourcePlanningMapper resourcePlanningMapper;

    /**
     * 查询资源规划管理
     * 
     * @param id 资源规划管理主键
     * @return 资源规划管理
     */
    @Override
    public ResourcePlanning selectResourcePlanningById(Long id)
    {
        return resourcePlanningMapper.selectResourcePlanningById(id);
    }

    /**
     * 查询资源规划管理列表
     * 
     * @param resourcePlanning 资源规划管理
     * @return 资源规划管理
     */
    @Override
    public List<ResourcePlanning> selectResourcePlanningList(ResourcePlanning resourcePlanning)
    {
        return resourcePlanningMapper.selectResourcePlanningList(resourcePlanning);
    }

    /**
     * 新增资源规划管理
     * 
     * @param resourcePlanning 资源规划管理
     * @return 结果
     */
    @Override
    public int insertResourcePlanning(ResourcePlanning resourcePlanning)
    {
        return resourcePlanningMapper.insertResourcePlanning(resourcePlanning);
    }

    /**
     * 修改资源规划管理
     * 
     * @param resourcePlanning 资源规划管理
     * @return 结果
     */
    @Override
    public int updateResourcePlanning(ResourcePlanning resourcePlanning)
    {
        return resourcePlanningMapper.updateResourcePlanning(resourcePlanning);
    }

    /**
     * 批量删除资源规划管理
     * 
     * @param ids 需要删除的资源规划管理主键
     * @return 结果
     */
    @Override
    public int deleteResourcePlanningByIds(String ids)
    {
        return resourcePlanningMapper.deleteResourcePlanningByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除资源规划管理信息
     * 
     * @param id 资源规划管理主键
     * @return 结果
     */
    @Override
    public int deleteResourcePlanningById(Long id)
    {
        return resourcePlanningMapper.deleteResourcePlanningById(id);
    }
}
